/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package de.realriu.snipzel.control.datastorage;

import de.realriu.snipzel.model.CodeSnippet;
import java.io.IOException;

/**
 *
 * @author riu
 */
public interface Storageable {
    boolean saveSnippet(CodeSnippet cs) throws IOException;
    boolean updateSnippet(CodeSnippet cs) throws IOException;
    CodeSnippet loadSnippet(long id, boolean lazy) throws IOException;
    CodeSnippet[] loadAllSnippets(boolean lazy) throws IOException;
    boolean deleteSnippet(CodeSnippet cs) throws IOException;
    boolean initWorkDirectory() throws IOException;
    String getURL(CodeSnippet cs) throws IOException;
    long getNewSnippetID() throws IOException;
    long getCentralVersion() throws IOException;
    long getMyVersion() throws IOException;
}
